home *** CD-ROM | disk | FTP | other *** search
/ 100 Plus Great Games 2 / 100PLUSV2.BIN / games / Sultan.dxr / scripts_8_foundation 2.ls < prev    next >
Encoding:
Text File  |  2002-01-25  |  672 b   |  24 lines

  1. property basecard, spriteNum
  2. global foundation, equal, currentselect
  3.  
  4. on beginSprite me
  5.   basecard = #ace
  6.   foundation.addProp(makesymbol(spriteNum), new(script("card pile")))
  7.   foundation[makesymbol(spriteNum)].addCard(spriteNum)
  8. end
  9.  
  10. on mouseEnter me
  11.   if (sprite(the clickOn).loc = the mouseLoc) and (the clickOn <> spriteNum) then
  12.     if (getlist(the clickOn).rankvalue = (foundation[makesymbol(spriteNum)].getlastcard().rankvalue + 1)) and (getlist(the clickOn).suit = foundation[makesymbol(spriteNum)].getlastcard().suit) then
  13.       equal = 1
  14.       currentselect = spriteNum
  15.     end if
  16.   end if
  17. end
  18.  
  19. on mouseLeave me
  20.   equal = 0
  21.   currentselect = 0
  22.   checkwin()
  23. end
  24.